package view.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.MainFrame;

/**
 * This class gives the New Game button in the Main Menu
 * its functionality. 
 * 
 * @author Stephanie
 *
 */
public class ToOccupationChooserListener implements ActionListener {

	private MainFrame mainFrame;
	private Boolean newGame;
	
	public ToOccupationChooserListener( MainFrame mainFrame, Boolean newGame) {
		this.mainFrame = mainFrame;
		this.newGame = newGame;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		mainFrame.changeActivePanel("OCCUPATION_CHOOSER_MENU");
		this.newGame = Boolean.TRUE;
		System.out.println(e.getActionCommand() + " " + newGame);
	}

}
